package com.wyz.note.project.security.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @Author: wei yz
 * @Date: 2022/6/18 16:45
 */
@RestController
public class HelloController {
    private static final Logger log = LoggerFactory.getLogger(HelloController.class);


    @GetMapping("/admin/hello")
    public String admin() {
        log.info("管理员接口：/admin/hello");
        return "管理员接口：/admin/hello";
    }

    @PostMapping("/success")
    public String success() {
        log.info("登录成功: success");
        return "登录成功: success";
    }

    @GetMapping("/user/hello")
    public String user() {
        log.info("普通用户接口：/user/hello");
        return "普通用户接口：/user/hello";
    }

    @GetMapping("/guest/hello")
    public String guest() {
        log.info("游客接口：/guest/hello");
        return "游客接口：/guest/hello";
    }

    @GetMapping("/hello")
    public String hello() {
        log.info("普通接口：/hello");
        return "普通接口：/hello";
    }
}
